/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package assignment2.pkg1;


import java.util.ArrayList;

/**
 *
 * @author MBoon
 */
public class ServerPool {

    private ArrayList<Customer> customers;
    private int numberOfServers;
    
    public ServerPool(int numberOfServers) {
        this.numberOfServers = numberOfServers;
        this.customers = new ArrayList<Customer>();
    }
    
    public boolean serverAvailable() {
        return numberOfServers > customers.size();
    }
    
    public void addCustomer(Customer c) {
        this.customers.add(c);
    }
    
    public void removeCustomer(Customer c) {
        customers.remove(c);
    }
    
    public int numberOfCustomersInService(){
        return customers.size();
    }
    
    
    
}
